<?php

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding your
| database. Just tell the factory how a default model should look.
|
*/

$factory->define(App\User::class, function (Faker\Generator $faker) {
    return [
        'name' => $faker->name,
        'email' => $faker->safeEmail,
        'password' => bcrypt(str_random(10)),
        'remember_token' => str_random(10),
    ];
});

/**
 * @see https://laravel.com/docs/5.2/seeding#using-model-factories
 * @see https://laravel.com/docs/5.2/testing#model-factories
 *
 * @example
 *      factory(Partner::class)->make() => $partner -> save()
 *      factory(Partner::class, 10)->make() => $partners
 *      factory(Partner::class, 1)->create()   create one
 *      factory(Partner::class, 10)->create()  create Many
 *      factory(Partner::class)->create(['other_property' => 'xxx'])
 * 指定不同的
 *      $user = factory(App\User::class, 'admin', 1)->make();
 *
 * Faker\Factory::create('zh_CN')->address()
 * @see \Faker\Factory::create()
 */
//$factory->define(\App\Http\Models\Partner::class, 'other_label', function (Faker\Generator $faker) {
$factory->define(\App\Http\Models\Partner::class, function (Faker\Generator $faker) {
    return [
        'name' => $faker->name,
        'logo_key' => '/fake-path/fake-img.png',
    ];
});